<%= form_for([@proyecto, @usuario]) do |f| %>
  <% if @usuario.errors.any? %>
    <div id="error_explanation">
        <p class="error">
        <%= pluralize(@usuario.errors.count, "error", "errores") %> guardando usuario:<br>
        <% @usuario.errors.full_messages.each do |msg| %>
            - <%= msg %><br>
        <% end %>
      </p>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :nombre %><br />
    <%= f.text_field :nombre %>
  </div>
  <div class="field">
    <%= f.label :email %><br />
    <%= f.text_field :email %>
  </div>
  <div class="field">
    <%= f.label :username %><br />
    <%= f.text_field :username %>
  </div>
  <div class="field">
    <%= f.label :password %><br />
    <%= f.password_field :password %>
  </div>
  <div class="field">
    <%= f.label :rol, "Rol" %><br />
    <%= select_tag("usuario[rol]", options_for_select([["Product Owner", "po"], ["Scrum Master", "sm"], ["Team Member", "tm"]], @usuario.rol)) %>
  </div>
  <div class="actions">
    <%= f.submit 'Guardar', :'data-disable-with' => 'Guardando...' %>
  </div>
<% end %>
